package com.party.poster;

import com.github.pagehelper.util.StringUtil;
import com.party.common.core.domain.entity.SysUser;
import com.party.poster.draw.PosterDefaultDraw;
import com.party.poster.entity.SamplePoster;
import com.party.poster.enums.EnumShape;

import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.rmi.ServerException;
import java.util.ArrayList;
import java.util.Base64;
import java.util.List;

/**
 * @author: zhaoyongke
 * @create: 2024-07-01 14:50
 * @description: eee
 */
public class PosterUtil {
    public static String getImage(SysUser user, String groudImagePath, String avatarPath, String ewmcode) throws IOException {

        return "";
    }


    public static List<String> splitStringByLength(String input, int length) {
        List<String> result = new ArrayList<String>();
        int start = 0;
        while (start < input.length()) {
            if (start + length <= input.length()) {
                // 添加从start开始，长度为length的子串
                result.add(input.substring(start, start + length));
            } else {
                // 如果剩余部分不足length，则添加剩余部分
                result.add(input.substring(start));
            }
            start += length;
        }
        return result;

    }


}

